<!--{Atemplate tpl/header}-->

<!--{eval echo $this->Ahtml_js_aurl();}-->
$column_json
<script>
function checkall(value) {
	if(value=='0'){
		jQuery(".checkbox").attr("checked","checked");
		jQuery("#chkall_del").removeAttr("disabled","disabled");
	}
	if(value=='1'){
		jQuery(".checkbox").removeAttr("checked","checked");
		jQuery("#chkall_del").attr("disabled","disabled");
	}
	if(value=='auth'){
		var chkall = jQuery("input:checked").val();
		if(chkall == null){
			alert('请先选择');
			return false;
		}else{
			return true;
		}
	}
}

jQuery(function(){
	jQuery(".checkbox").change(function (){
		if(jQuery("input:checked").val()){
			jQuery("#chkall_del").removeAttr("disabled","disabled");
		}else{
			jQuery("#chkall_del").attr("disabled","disabled");
		}
	});
})
</script>
<h2>$this->title<!--{if $this->uinfo}--> - <a href="{$this->Aapp}-member-show-$this->uinfo->uid">$this->uinfo->username</a><!--{/if}--> - 导航</h2>
<p>
	<input type="button" value="栏目设置" onclick="Apps.list.column()"/>
	<input type="button" value="添加" onclick="Apps.list.add()"/>
</p>
<div class="_data_column dis_none">
	<div class="_list">$column_html</div>
	<input type="submit" value="确定"/>
</div>
<table class="-table">
	<tr>
	<!--{loop $column $key $val}-->
		<th><b><a href="$page->theurl-aorder-$key,$pages->neworder$pages->other">$val</a></b></th>
	<!--{/loop}-->
		<th><b>管理</b></th>
	</tr>
<!--{loop $list $key $val}-->
	<tr>
		<!--{eval echo $obj->for_html($key,$val,$column,$this->model);}-->
		<td>
			<input type="button" onclick="Apps.list.add('$val[$key_name]')" value="编辑" id=""/>
			<input type="submit" value="删除" onClick="javascript:if(confirm('确实要删除吗?')) form.action='$this->Amodr-del-$val[id]';" />
		</td>
		<input type="hidden" name="save[{$key}][id]" size="1" value="$val[id]">
	</tr>
<!--{/loop}-->
	<tr>
		<td colspan="10">
			<input type="button" onclick="javascript:checkall(0);" value="全选" >
			<input type="button" onclick="javascript:checkall(1);" value="反选">
			<input type="submit" id="chkall_del" disabled="disabled" value="删除选择" onClick="javascript:form.action='$this->Amodr-delall';" />
			<input type="submit" name="submit" value="全部保存" onClick="javascript:form.action='$this->Amodr-save';" />
		</td>
	</tr>
</table>

</form>
<!-- 分页 -->
$apage

<!--{Atemplate tpl/footer}-->